package com.ruoyi.project.jiaqin.quotation.mapper;

import com.github.pagehelper.PageInfo;
import com.ruoyi.project.jiaqin.quotation.domain.Quotation;
import com.ruoyi.project.jiaqin.quotation.domain.QuotationSelectedBean;
import com.ruoyi.project.jiaqin.quotation.domain.QuotationTrend;
import com.ruoyi.project.jiaqin.quotationlikes.domain.MemberQuotationLikes;
import com.ruoyi.project.jiaqin.thrclasstrend.domain.ThrClassTrend;
import com.ruoyi.project.jiaqin.twoclasstrend.domain.TwoClassTrend;

import java.util.List;

/**
 * 行情Mapper接口
 *
 * @author admin
 * @date 2020-12-21
 */
public interface QuotationMapper
{
    /**
     * 查询行情
     *
     * @param id 行情ID
     * @return 行情
     */
    public Quotation selectQuotationById(String id);
    /**
     * 查询行情列表
     *
     * @param quotation 行情
     * @return 行情集合
     */
    public List<Quotation> selectQuotationList(Quotation quotation);
    public List<Quotation> selectQuotationFive();
    public Quotation selectQuotationByTwoId(String memberId, String classIdThr);

    public int updateLikes(Long num,String quotationId);
    /**
     * 查询二级分类七天的行情走势
     * @param twoClassId
     * @return
     */
    public List<QuotationTrend> getTrendForTwoQClass(String twoClassId);
    /**
     * 新增行情
     *
     * @param quotation 行情
     * @return 结果
     */
    public int insertQuotation(Quotation quotation);

    /**
     * 修改行情
     *
     * @param quotation 行情
     * @return 结果
     */
    public int updateQuotation(Quotation quotation);

    /**
     * 删除行情
     *
     * @param id 行情ID
     * @return 结果
     */
    public int deleteQuotationById(String id);

    /**
     * 批量删除行情
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteQuotationByIds(String[] ids);



    public List<TwoClassTrend> getTwoClassTodayAndLastdayAvg();
    public List<ThrClassTrend> getThrClassTodayAndLastdayAvg();

    public List<Quotation> getQuotation(String memberId);

    public List<Quotation> findQuotationList(Quotation quotation);

    public List<Quotation> getQuotationReleaseByParams(QuotationSelectedBean bean);
    public List<Quotation> getQuotationReleaseByParamsDescTime(QuotationSelectedBean bean);

    public int addQuotationLooksById(String id);

    public List<Quotation> getQuotationReleaseByParamsDescDistance(QuotationSelectedBean bean);
    public int unlikesQuotationLin(MemberQuotationLikes memberQuotationLikes);
    public int likesQuotationLin(MemberQuotationLikes memberQuotationLikes);

    public PageInfo<Quotation> getQuotationListByMemberId(Integer pageNum, Integer pageSize, String memberId);

    public List<Quotation> getQuotationListByMemberId2(String memberId);

    public List<Quotation> getQuotationNumByMemberId(String memberId);
}
